﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 例2._4_图形排版
{
    class Program
    {
        static void Main(string[] args)
        {
			int h;
			string line;
			while ((line = Console.ReadLine()) != null)
			{
                try
                {
					string[] token = line.Split();
					h = Convert.ToInt32(token[0]);
					int row = h;    //行数 h
					int col = h + (h - 1) * 2;  //列数 h+2*(h-1)

					for (int i = 1; i <= row; i++)  //确定行数
					{
						for (int j = 1; j <= col; j++)      //确定列数
						{
							if (j > col - h - 2 * (i - 1))//此处减去h，表示减去那些每行都有的输出元素。此处i从1开始，所以为i-1。
							{
								Console.Write("*");
							}
							else
							{
								Console.Write(" ");
							}
						}
						Console.WriteLine();
					}
				}
				catch(Exception e)
                {
					Console.WriteLine(e.ToString());
                    Console.WriteLine("请输入正确的数字");
                }
			}
		}
    }
}
